var tianPosList = {
"tian-bihua-show-tpl-1-0":{"\u5de6\u4e0a":{"x":0.2658108108108108,"y":0.041714285714285704},"\u53f3\u4e0a":{"x":0.38155405405405407,"y":0.04238095238095238},"\u5de6\u4e0b":{"x":0.2686486486486486,"y":0.12280952380952379},"\u53f3\u4e0b":{"x":0.3783783783783784,"y":0.12223809523809523}},
"tian-bihua-show-tpl-2-0":{"\u5de6\u4e0a":{"x":0.3737837837837838,"y":0.0430952380952381},"\u53f3\u4e0a":{"x":0.4894594594594594,"y":0.04214285714285715},"\u5de6\u4e0b":{"x":0.3752027027027027,"y":0.12419047619047621},"\u53f3\u4e0b":{"x":0.4885135135135135,"y":0.12447619047619049}},
"tian-bihua-show-tpl-3-0":{"\u5de6\u4e0a":{"x":0.483445945945946,"y":0.04128571428571429},"\u53f3\u4e0a":{"x":0.5947972972972972,"y":0.04185714285714287},"\u5de6\u4e0b":{"x":0.4826351351351352,"y":0.12657142857142858},"\u53f3\u4e0b":{"x":0.5947297297297298,"y":0.12514285714285714}},
"tian-bihua-show-tpl-4-0":{"\u5de6\u4e0a":{"x":0.5878378378378379,"y":0.04128571428571429},"\u53f3\u4e0a":{"x":0.7000675675675676,"y":0.04033333333333333},"\u5de6\u4e0b":{"x":0.5883108108108108,"y":0.12466666666666668},"\u53f3\u4e0b":{"x":0.7000675675675676,"y":0.12300000000000003}},
"tian-bihua-show-tpl-5-0":{"\u5de6\u4e0a":{"x":0.6924324324324325,"y":0.04223809523809524},"\u53f3\u4e0a":{"x":0.804391891891892,"y":0.042190476190476195},"\u5de6\u4e0b":{"x":0.6945945945945946,"y":0.12290476190476188},"\u53f3\u4e0b":{"x":0.8081081081081081,"y":0.1252857142857143}},
"tian-bihua-show-tpl-6-0":{"\u5de6\u4e0a":{"x":0.8028378378378378,"y":0.037380952380952376},"\u53f3\u4e0a":{"x":0.9135135135135135,"y":0.036000000000000004},"\u5de6\u4e0b":{"x":0.8007432432432433,"y":0.11976190476190476},"\u53f3\u4e0b":{"x":0.9087162162162161,"y":0.1182857142857143}},
"tian-bihua-show-tpl-1-1":{"\u5de6\u4e0a":{"x":0.2685135135135135,"y":0.18566666666666667},"\u53f3\u4e0a":{"x":0.3868918918918919,"y":0.18380952380952384},"\u5de6\u4e0b":{"x":0.26878378378378376,"y":0.27342857142857147},"\u53f3\u4e0b":{"x":0.3856756756756756,"y":0.2693809523809524}},
"tian-bihua-show-tpl-2-1":{"\u5de6\u4e0a":{"x":0.37006756756756753,"y":0.1873809523809524},"\u53f3\u4e0a":{"x":0.4982432432432432,"y":0.18185714285714286},"\u5de6\u4e0b":{"x":0.37391891891891893,"y":0.27161904761904765},"\u53f3\u4e0b":{"x":0.4960135135135135,"y":0.27109523809523806}},
"tian-bihua-show-tpl-3-1":{"\u5de6\u4e0a":{"x":0.48249999999999993,"y":0.18680952380952384},"\u53f3\u4e0a":{"x":0.5974999999999999,"y":0.1845238095238095},"\u5de6\u4e0b":{"x":0.4798648648648648,"y":0.2697142857142857},"\u53f3\u4e0b":{"x":0.5972972972972973,"y":0.26857142857142857}},
"tian-bihua-show-tpl-4-1":{"\u5de6\u4e0a":{"x":0.5898648648648648,"y":0.19090476190476194},"\u53f3\u4e0a":{"x":0.7153378378378378,"y":0.18466666666666667},"\u5de6\u4e0b":{"x":0.5902702702702702,"y":0.27776190476190477},"\u53f3\u4e0b":{"x":0.7101351351351352,"y":0.27414285714285713}},
"tian-bihua-show-tpl-5-1":{"\u5de6\u4e0a":{"x":0.6945945945945946,"y":0.1870952380952381},"\u53f3\u4e0a":{"x":0.8072972972972973,"y":0.18657142857142855},"\u5de6\u4e0b":{"x":0.6971621621621621,"y":0.2654761904761905},"\u53f3\u4e0b":{"x":0.8061486486486487,"y":0.26857142857142857}},
"tian-bihua-show-tpl-6-1":{"\u5de6\u4e0a":{"x":0.8030405405405405,"y":0.18804761904761905},"\u53f3\u4e0a":{"x":0.926554054054054,"y":0.1842857142857143},"\u5de6\u4e0b":{"x":0.8024324324324325,"y":0.27309523809523806},"\u53f3\u4e0b":{"x":0.9233783783783783,"y":0.27}},
"tian-bihua-show-tpl-1-2":{"\u5de6\u4e0a":{"x":0.26,"y":0.32457142857142857},"\u53f3\u4e0a":{"x":0.3835135135135135,"y":0.3241428571428572},"\u5de6\u4e0b":{"x":0.26439189189189194,"y":0.41123809523809524},"\u53f3\u4e0b":{"x":0.38202702702702707,"y":0.41152380952380957}},
"tian-bihua-show-tpl-2-2":{"\u5de6\u4e0a":{"x":0.36979729729729727,"y":0.32252380952380955},"\u53f3\u4e0a":{"x":0.49432432432432427,"y":0.32047619047619047},"\u5de6\u4e0b":{"x":0.37540540540540546,"y":0.4061428571428572},"\u53f3\u4e0b":{"x":0.49087837837837833,"y":0.40690476190476194}},
"tian-bihua-show-tpl-3-2":{"\u5de6\u4e0a":{"x":0.4745945945945945,"y":0.32357142857142857},"\u53f3\u4e0a":{"x":0.6037837837837837,"y":0.3210476190476191},"\u5de6\u4e0b":{"x":0.4810135135135135,"y":0.41252380952380957},"\u53f3\u4e0b":{"x":0.5961486486486486,"y":0.41204761904761905}},
"tian-bihua-show-tpl-4-2":{"\u5de6\u4e0a":{"x":0.5790540540540541,"y":0.32276190476190475},"\u53f3\u4e0a":{"x":0.705,"y":0.31923809523809527},"\u5de6\u4e0b":{"x":0.580945945945946,"y":0.4124761904761905},"\u53f3\u4e0b":{"x":0.6984459459459459,"y":0.4093333333333334}},
"tian-bihua-show-tpl-5-2":{"\u5de6\u4e0a":{"x":0.6895945945945946,"y":0.32352380952380955},"\u53f3\u4e0a":{"x":0.812027027027027,"y":0.32057142857142856},"\u5de6\u4e0b":{"x":0.6928378378378378,"y":0.4067619047619048},"\u53f3\u4e0b":{"x":0.8117567567567567,"y":0.40723809523809523}},
"tian-bihua-show-tpl-6-2":{"\u5de6\u4e0a":{"x":0.7897297297297297,"y":0.3248095238095238},"\u53f3\u4e0a":{"x":0.9112162162162162,"y":0.32085714285714284},"\u5de6\u4e0b":{"x":0.7918243243243243,"y":0.4082857142857143},"\u53f3\u4e0b":{"x":0.914527027027027,"y":0.4040952380952381}},
"cizu_word_0_1":{"\u5de6\u4e0a":{"x":0.0029729729729729704,"y":0.4474761904761904},"\u53f3\u4e0a":{"x":0.1133108108108108,"y":0.4487142857142857},"\u5de6\u4e0b":{"x":-0.003581081081081086,"y":0.5320952380952382},"\u53f3\u4e0b":{"x":0.11614864864864864,"y":0.5344285714285715}},
"cizu_word_0_2":{"\u5de6\u4e0a":{"x":0.10770270270270271,"y":0.45176190476190475},"\u53f3\u4e0a":{"x":0.2256756756756757,"y":0.45142857142857146},"\u5de6\u4e0b":{"x":0.10614864864864865,"y":0.5325238095238096},"\u53f3\u4e0b":{"x":0.2252702702702703,"y":0.5307142857142857}},
"cizu_word_0_3":{"\u5de6\u4e0a":{"x":0.23385135135135138,"y":0.4500476190476191},"\u53f3\u4e0a":{"x":0.34202702702702703,"y":0.4505238095238095},"\u5de6\u4e0b":{"x":0.23641891891891892,"y":0.5332857142857144},"\u53f3\u4e0b":{"x":0.3435810810810811,"y":0.5344285714285715}},
"cizu_word_0_4":{"\u5de6\u4e0a":{"x":0.33425675675675676,"y":0.4488095238095238},"\u53f3\u4e0a":{"x":0.45256756756756755,"y":0.448},"\u5de6\u4e0b":{"x":0.3319594594594595,"y":0.5318571428571428},"\u53f3\u4e0b":{"x":0.4514864864864865,"y":0.532}},
"cizu_word_0_5":{"\u5de6\u4e0a":{"x":0.46364864864864863,"y":0.4466666666666667},"\u53f3\u4e0a":{"x":0.5725675675675675,"y":0.4466666666666667},"\u5de6\u4e0b":{"x":0.4645270270270271,"y":0.5293333333333334},"\u53f3\u4e0b":{"x":0.5741216216216216,"y":0.5283333333333333}},
"cizu_word_0_6":{"\u5de6\u4e0a":{"x":0.5692567567567568,"y":0.44957142857142857},"\u53f3\u4e0a":{"x":0.6824324324324325,"y":0.45042857142857146},"\u5de6\u4e0b":{"x":0.5678378378378378,"y":0.5312380952380953},"\u53f3\u4e0b":{"x":0.682027027027027,"y":0.5325238095238096}},
"cizu_word_0_7":{"\u5de6\u4e0a":{"x":0.6918918918918919,"y":0.45042857142857146},"\u53f3\u4e0a":{"x":0.8087162162162163,"y":0.4498095238095238},"\u5de6\u4e0b":{"x":0.6918918918918919,"y":0.5300476190476191},"\u53f3\u4e0b":{"x":0.8090540540540541,"y":0.5297142857142858}},
"cizu_word_0_8":{"\u5de6\u4e0a":{"x":0.8008108108108108,"y":0.4463333333333333},"\u53f3\u4e0a":{"x":0.9208108108108108,"y":0.4486666666666667},"\u5de6\u4e0b":{"x":0.7991891891891892,"y":0.5336666666666667},"\u53f3\u4e0b":{"x":0.9183108108108108,"y":0.5290952380952381}},
"cizu_word_1_1":{"\u5de6\u4e0a":{"x":0.009594594594594594,"y":0.5660476190476191},"\u53f3\u4e0a":{"x":0.10891891891891892,"y":0.5663809523809524},"\u5de6\u4e0b":{"x":0.008175675675675675,"y":0.6403333333333334},"\u53f3\u4e0b":{"x":0.10905405405405405,"y":0.6397619047619048}},
"cizu_word_1_2":{"\u5de6\u4e0a":{"x":0.10722972972972973,"y":0.5641904761904762},"\u53f3\u4e0a":{"x":0.22499999999999998,"y":0.5648571428571428},"\u5de6\u4e0b":{"x":0.11155405405405407,"y":0.6473809523809524},"\u53f3\u4e0b":{"x":0.2268243243243243,"y":0.6443333333333333}},
"cizu_word_1_3":{"\u5de6\u4e0a":{"x":0.23851351351351352,"y":0.5643809523809524},"\u53f3\u4e0a":{"x":0.33655405405405403,"y":0.5652857142857143},"\u5de6\u4e0b":{"x":0.23939189189189192,"y":0.6379523809523809},"\u53f3\u4e0b":{"x":0.33783783783783783,"y":0.6393333333333334}},
"cizu_word_1_4":{"\u5de6\u4e0a":{"x":0.3377027027027027,"y":0.5651428571428572},"\u53f3\u4e0a":{"x":0.4443918918918919,"y":0.5654285714285715},"\u5de6\u4e0b":{"x":0.33574324324324323,"y":0.6398571428571429},"\u53f3\u4e0b":{"x":0.4477702702702703,"y":0.641}},
"cizu_word_1_5":{"\u5de6\u4e0a":{"x":0.46885135135135136,"y":0.5652380952380953},"\u53f3\u4e0a":{"x":0.5728378378378378,"y":0.5652857142857143},"\u5de6\u4e0b":{"x":0.4690540540540541,"y":0.6405238095238096},"\u53f3\u4e0b":{"x":0.5741891891891892,"y":0.6401428571428572}},
"cizu_word_1_6":{"\u5de6\u4e0a":{"x":0.5729054054054054,"y":0.564857142857143},"\u53f3\u4e0a":{"x":0.6771621621621622,"y":0.5646666666666667},"\u5de6\u4e0b":{"x":0.5731081081081081,"y":0.6390476190476191},"\u53f3\u4e0b":{"x":0.6781081081081081,"y":0.6416190476190476}},
"cizu_word_1_7":{"\u5de6\u4e0a":{"x":0.7031756756756756,"y":0.5666666666666667},"\u53f3\u4e0a":{"x":0.8041216216216216,"y":0.5683809523809524},"\u5de6\u4e0b":{"x":0.7033108108108108,"y":0.6411428571428572},"\u53f3\u4e0b":{"x":0.8071621621621622,"y":0.6402857142857143}},
"cizu_word_1_8":{"\u5de6\u4e0a":{"x":0.8095945945945946,"y":0.5664285714285715},"\u53f3\u4e0a":{"x":0.9161486486486486,"y":0.565952380952381},"\u5de6\u4e0b":{"x":0.8103378378378379,"y":0.6421904761904762},"\u53f3\u4e0b":{"x":0.9151351351351351,"y":0.6418571428571429}},
"cizu_word_2_1":{"\u5de6\u4e0a":{"x":0.012905405405405412,"y":0.6869047619047619},"\u53f3\u4e0a":{"x":0.1118918918918919,"y":0.6856666666666666},"\u5de6\u4e0b":{"x":0.012905405405405412,"y":0.7556666666666666},"\u53f3\u4e0b":{"x":0.11574324324324324,"y":0.7587619047619047}},
"cizu_word_2_2":{"\u5de6\u4e0a":{"x":0.11493243243243244,"y":0.6856666666666666},"\u53f3\u4e0a":{"x":0.2219594594594595,"y":0.6845238095238095},"\u5de6\u4e0b":{"x":0.11486486486486487,"y":0.7589047619047619},"\u53f3\u4e0b":{"x":0.22222972972972976,"y":0.7586190476190476}},
"cizu_word_2_3":{"\u5de6\u4e0a":{"x":0.2445945945945946,"y":0.6857142857142857},"\u53f3\u4e0a":{"x":0.3439864864864865,"y":0.6858095238095238},"\u5de6\u4e0b":{"x":0.24412162162162165,"y":0.7569523809523809},"\u53f3\u4e0b":{"x":0.34351351351351356,"y":0.7562380952380953}},
"cizu_word_2_4":{"\u5de6\u4e0a":{"x":0.34121621621621623,"y":0.6847619047619047},"\u53f3\u4e0a":{"x":0.4495945945945946,"y":0.6856190476190476},"\u5de6\u4e0b":{"x":0.34351351351351356,"y":0.7564285714285715},"\u53f3\u4e0b":{"x":0.45236486486486494,"y":0.7577142857142857}},
"cizu_word_2_5":{"\u5de6\u4e0a":{"x":0.4745270270270271,"y":0.6868095238095238},"\u53f3\u4e0a":{"x":0.5781081081081081,"y":0.6870952380952381},"\u5de6\u4e0b":{"x":0.47168918918918923,"y":0.7584761904761904},"\u53f3\u4e0b":{"x":0.5768243243243244,"y":0.7603333333333333}},
"cizu_word_2_6":{"\u5de6\u4e0a":{"x":0.5785135135135135,"y":0.6809047619047619},"\u53f3\u4e0a":{"x":0.6800675675675676,"y":0.6814285714285714},"\u5de6\u4e0b":{"x":0.5783108108108108,"y":0.7528571428571428},"\u53f3\u4e0b":{"x":0.6812162162162162,"y":0.7527142857142857}},
"cizu_word_2_7":{"\u5de6\u4e0a":{"x":0.7044594594594594,"y":0.6814285714285714},"\u53f3\u4e0a":{"x":0.8085810810810811,"y":0.6825238095238095},"\u5de6\u4e0b":{"x":0.7024324324324325,"y":0.7554761904761904},"\u53f3\u4e0b":{"x":0.8101351351351351,"y":0.755047619047619}},
"cizu_word_2_8":{"\u5de6\u4e0a":{"x":0.8085810810810811,"y":0.6846666666666666},"\u53f3\u4e0a":{"x":0.9128378378378379,"y":0.6835238095238095},"\u5de6\u4e0b":{"x":0.8114864864864865,"y":0.7572857142857143},"\u53f3\u4e0b":{"x":0.9177027027027027,"y":0.7556666666666667}},
"G4-0":{"\u5de6\u4e0a":{"x":0.015307807807808,"y":0.54994973544974},"\u53f3\u4e0a":{"x":0.1142454954955,"y":0.5462671957672},"\u5de6\u4e0b":{"x":0.016462231462231,"y":0.61891636141636},"\u53f3\u4e0b":{"x":0.11539991914992,"y":0.62036772486772}},"G4-1":{"\u5de6\u4e0a":{"x":0.1142454954955,"y":0.54994973544974},"\u53f3\u4e0a":{"x":0.21318318318318,"y":0.5462671957672},"\u5de6\u4e0b":{"x":0.11539991914992,"y":0.61891636141636},"\u53f3\u4e0b":{"x":0.21433760683761,"y":0.62036772486772}},"G1-0":{"\u5de6\u4e0a":{"x":0.23939189189189,"y":0.54918027210884},"\u53f3\u4e0a":{"x":0.33903586278586,"y":0.54884798534799},"\u5de6\u4e0b":{"x":0.24011261261261,"y":0.6199126984127},"\u53f3\u4e0b":{"x":0.33975658350658,"y":0.61885238095238}},"G1-1":{"\u5de6\u4e0a":{"x":0.33903586278586,"y":0.54918027210884},"\u53f3\u4e0a":{"x":0.43867983367983,"y":0.54884798534799},"\u5de6\u4e0b":{"x":0.33975658350658,"y":0.6199126984127},"\u53f3\u4e0b":{"x":0.43940055440055,"y":0.61885238095238}},"G2-0":{"\u5de6\u4e0a":{"x":0.46263513513514,"y":0.55036772486772},"\u53f3\u4e0a":{"x":0.56265202702703,"y":0.5505},"\u5de6\u4e0b":{"x":0.46429429429429,"y":0.62277513227513},"\u53f3\u4e0b":{"x":0.56431118618619,"y":0.6234417989418}},"G2-1":{"\u5de6\u4e0a":{"x":0.56265202702703,"y":0.55036772486772},"\u53f3\u4e0a":{"x":0.66266891891892,"y":0.5505},"\u5de6\u4e0b":{"x":0.56431118618619,"y":0.62277513227513},"\u53f3\u4e0b":{"x":0.66432807807808,"y":0.6234417989418}},"G3-0":{"\u5de6\u4e0a":{"x":0.68471933471933,"y":0.55459157509158},"\u53f3\u4e0a":{"x":0.78297903672904,"y":0.55118253968254},"\u5de6\u4e0b":{"x":0.68117398648649,"y":0.62092592592593},"\u53f3\u4e0b":{"x":0.77943368849619,"y":0.62280612244898}},"G3-1":{"\u5de6\u4e0a":{"x":0.78297903672904,"y":0.55459157509158},"\u53f3\u4e0a":{"x":0.88123873873874,"y":0.55118253968254},"\u5de6\u4e0b":{"x":0.77943368849619,"y":0.62092592592593},"\u53f3\u4e0b":{"x":0.87769339050589,"y":0.62280612244898}},"H4-0":{"\u5de6\u4e0a":{"x":0.014054054054054,"y":0.64542857142857},"\u53f3\u4e0a":{"x":0.11465713053479,"y":0.64402178318136},"\u5de6\u4e0b":{"x":0.012837837837838,"y":0.66148941798942},"\u53f3\u4e0b":{"x":0.11344091431857,"y":0.66290952380952}},"H4-1":{"\u5de6\u4e0a":{"x":0.11465713053479,"y":0.64542857142857},"\u53f3\u4e0a":{"x":0.21526020701553,"y":0.64402178318136},"\u5de6\u4e0b":{"x":0.11344091431857,"y":0.66148941798942},"\u53f3\u4e0b":{"x":0.21404399079931,"y":0.66290952380952}},"H1-0":{"\u5de6\u4e0a":{"x":0.23644963144963,"y":0.64330086580087},"\u53f3\u4e0a":{"x":0.33661358911359,"y":0.64483333333333},"\u5de6\u4e0b":{"x":0.23793918918919,"y":0.66447619047619},"\u53f3\u4e0b":{"x":0.33810314685315,"y":0.66333333333333}},"H1-1":{"\u5de6\u4e0a":{"x":0.33661358911359,"y":0.64330086580087},"\u53f3\u4e0a":{"x":0.43677754677755,"y":0.64483333333333},"\u5de6\u4e0b":{"x":0.33810314685315,"y":0.66447619047619},"\u53f3\u4e0b":{"x":0.4382671045171,"y":0.66333333333333}},"H2-0":{"\u5de6\u4e0a":{"x":0.46268581081081,"y":0.63889682539683},"\u53f3\u4e0a":{"x":0.56126407657658,"y":0.64168253968254},"\u5de6\u4e0b":{"x":0.46278378378378,"y":0.66094761904762},"\u53f3\u4e0b":{"x":0.56136204954955,"y":0.66223333333333}},"H2-1":{"\u5de6\u4e0a":{"x":0.56126407657658,"y":0.63889682539683},"\u53f3\u4e0a":{"x":0.65984234234234,"y":0.64168253968254},"\u5de6\u4e0b":{"x":0.56136204954955,"y":0.66094761904762},"\u53f3\u4e0b":{"x":0.65994031531532,"y":0.66223333333333}},"H3-0":{"\u5de6\u4e0a":{"x":0.68561936936937,"y":0.64434920634921},"\u53f3\u4e0a":{"x":0.78565503003003,"y":0.64533068783069},"\u5de6\u4e0b":{"x":0.68769763513513,"y":0.66113928571429},"\u53f3\u4e0b":{"x":0.7877332957958,"y":0.66339880952381}},"H3-1":{"\u5de6\u4e0a":{"x":0.78565503003003,"y":0.64434920634921},"\u53f3\u4e0a":{"x":0.88569069069069,"y":0.64533068783069},"\u5de6\u4e0b":{"x":0.7877332957958,"y":0.66113928571429},"\u53f3\u4e0b":{"x":0.88776895645646,"y":0.66339880952381}},"I4-0":{"\u5de6\u4e0a":{"x":0.015337837837838,"y":0.66465873015873},"\u53f3\u4e0a":{"x":0.11570463320463,"y":0.66411904761905},"\u5de6\u4e0b":{"x":0.012895752895753,"y":0.73474489795918},"\u53f3\u4e0b":{"x":0.11326254826255,"y":0.7332867494824}},"I4-1":{"\u5de6\u4e0a":{"x":0.11570463320463,"y":0.66465873015873},"\u53f3\u4e0a":{"x":0.21607142857143,"y":0.66411904761905},"\u5de6\u4e0b":{"x":0.11326254826255,"y":0.73474489795918},"\u53f3\u4e0b":{"x":0.21362934362934,"y":0.7332867494824}},
"pos_keys":["tian-bihua-show-tpl-1-0","tian-bihua-show-tpl-2-0","tian-bihua-show-tpl-3-0","tian-bihua-show-tpl-4-0","tian-bihua-show-tpl-5-0","tian-bihua-show-tpl-6-0","tian-bihua-show-tpl-1-1","tian-bihua-show-tpl-2-1","tian-bihua-show-tpl-3-1","tian-bihua-show-tpl-4-1","tian-bihua-show-tpl-5-1","tian-bihua-show-tpl-6-1","tian-bihua-show-tpl-1-2","tian-bihua-show-tpl-2-2","tian-bihua-show-tpl-3-2","tian-bihua-show-tpl-4-2","tian-bihua-show-tpl-5-2","tian-bihua-show-tpl-6-2","cizu_word_0_1","cizu_word_1_1","cizu_word_2_1","cizu_word_0_2","cizu_word_1_2","cizu_word_2_2","cizu_word_0_3","cizu_word_1_3","cizu_word_2_3","cizu_word_0_4","cizu_word_1_4","cizu_word_2_4","cizu_word_0_5","cizu_word_1_5","cizu_word_2_5","cizu_word_0_6","cizu_word_1_6","cizu_word_2_6","cizu_word_0_7","cizu_word_1_7","cizu_word_2_7","cizu_word_0_8","cizu_word_1_8","cizu_word_2_8"]};

var offsetPos = {x:-1,y:-1};
var offsetPosTwo = [{x:-1,y:-1},{x:-1,y:-1}];
var tianOffsetPosList = [] ;
let R2A = (180/Math.PI);//弧度转角度
//1弧度=180/π度
//1度=π/180弧度

var offsetTwoPos=[{x:-1,y:-1},{x:-1,y:-1}];
var offsetA = 0;//便宜角度

function isSetOffsetPosTwo()
{
    var is = false;
    if(offsetPosTwo[0].x >= 0 &&
        offsetPosTwo[0].y >= 0 &&
        offsetPosTwo[1].x >= 0 &&
        offsetPosTwo[1].y >= 0
    ){
        is = true;
    }

    return is;
}

function getOffsetPosByOffsetA(oneKey, offsetA)
{
    var onePos = tianPosList[oneKey];
    //console.log("getOffsetPosByOffsetA:"+oneKey);

    var halfMe = (onePos.右上.x - onePos.左上.x)/2;
    var radius = Math.sqrt(halfMe * halfMe + halfMe * halfMe)/2;

    //大边长度
    var sf = (onePos.左上.x);// + halfMe)*148;

  //求 Y
    //step 1
    var aa = offsetA;
    var sa = sf;
    var ab = (180 - aa)/2;
    var sh = 2 * sa * Math.cos(ab * Math.PI / 180);
    
    //step2
    var ab = (180 - offsetA)/2;
    var BB = ab * Math.PI/180;
    var sc = sh;
    var sb = sc * Math.sin(BB);
    var sg = sb;
    var y = sg///210;

    var AA = (90-ab) * Math.PI/180;
    var sa = sc * Math.sin(AA);//oo1: 这个 sa 应该等于 sf-下面的 sb..
    
  //求 X
    var ab = 90 - aa;
    var BB = ab * Math.PI/180;

    var sb = sf * Math.sin(BB);
    var x = sb///148

    //验证上面 oo1


    return {"x":x,"y":y,"radius":radius*2};
}


function getOffstAByTwo()
{
    var sa = Math.abs(offsetPosTwo[1].y-offsetPosTwo[0].y)*210;//b 边长
    var sb = Math.abs(offsetPosTwo[1].x-offsetPosTwo[0].x)*148;//a 边长
        
    var sc = Math.sqrt(sa * sa + sb * sb);//求出 C 边长
    var aa = Math.asin(sa/sc) * 180 / Math.PI;//求出角度
    
    return aa;
}

function prepareEveryThingByTwo(){
    if(!isSetOffsetPosTwo()){
        return;
    }

    //根据两个点，得到偏移定位角度 aa=offset-a
    offsetA = getOffstAByTwo();

    //循环算出偏移后的坐标
    tianOffsetPosList = [];
    for(var i=0;i<tianPosList.pos_keys.length;i++){
        var oneKey = tianPosList.pos_keys[i];

        tianOffsetPosList[oneKey] = getOffsetPosByOffsetA(oneKey, offsetA);
    }
}

function restoreXByXTwo(x=Number,y=Number)
{
    var sg = x * 148;
    var sf = y * 210;

    var sa = Math.sqrt(sf*sf+sg*sg);

    var x = sa / 148;
    
    return x;
}

function restoreYByYTwo(x=Number,y=Number)
{
    //step1
    var sg = x * 148;
    var sf = y * 210;

    var sa = Math.sqrt(sf*sf+sg*sg);

    var aa = offsetA;
    var ab = (180 - aa)/2;
    var sh = 2 * sa * Math.cos(ab * Math.PI / 180);

    //step2
    var ab_another = ab;//直角三角形角 B
    //var sh //直角三角形大斜边 C
    var BB = ab_another * Math.PI / 180;//角 B 的弧度
    var sb = sh * Math.sin(BB);//得到底边 b

    var y = sb / 210;
    
    return y;
}

function isContainByPosTwo(oneKey=String, x=Number,y=Number)
{
    var onePos = tianOffsetPosList[oneKey];
    if(typeof onePos == "undefined")    return false;

    var isContian = false;
    if(Math.abs(onePos.x-x) < onePos.radius &&
       Math.abs(onePos.y-y) < onePos.radius
    ){
        isContian = true;
    }

    return isContian;
}


function getPosNameByPosTwo(x=Number,y=Number)
{
    var name='';
    x -= offsetPosTwo[0].x;
    y -= offsetPosTwo[0].y;
    
    console.log("getPosNameByPosTwo");
    for(var i=0;i<tianPosList.pos_keys.length;i++){
        var oneKey = tianPosList.pos_keys[i];

        if(isContainByPosTwo(oneKey,x,y)){
            name = oneKey;
            console.log(name+"\t matching.");
        }

    }

    return name;
}


function setOffsetPosTwo(posTwo=Array)
{
    offsetPosTwo[0] = posTwo[0];
    offsetPosTwo[1] = posTwo[1];

    prepareEveryThingByTwo();
}

function isSetOffsetPos()
{
    var is = false;
    if(offsetPos.x >= 0 &&
        offsetPos.y >= 0
    ){
        is = true;
    }

    return is;
}

function setOffsetPos(x=Number, y=Number)
{
    offsetPos.x = x;
    offsetPos.y = y;
}


function getOffsetPoxByXY(x=Number,y=Number)
{
  var posX = x - offsetPos.x;
  var posY = y - offsetPos.y;

  return [posX,posY];
}

function isContainByPos(oneKey=String, x=Number,y=Number)
{
    var onePos = tianPosList[oneKey];
    var isContian = false;

    if(typeof onePos.左上 == "undefined"){
        console.log("没有左上");
        console.log(oneKey);
    }

    if(onePos.左上.x < x &&
       onePos.左上.y < y &&

       onePos.右上.x > x &&
       onePos.右上.y < y &&

       onePos.左下.x < x &&
       onePos.左下.y > y &&

       onePos.右下.x > x &&
       onePos.右下.y > y
    ){
        isContian = true;
    }

    return isContian;
}

function getAllCanvasKey()
{
    return tianPosList.pos_keys;
}

function getPosNameByPos(x=Number,y=Number)
{
    var name='';
    x -= offsetPos.x;
    y -= offsetPos.y;
    
    for(var i=0;i<tianPosList.pos_keys.length;i++){
        var oneKey = tianPosList.pos_keys[i];

        if(isContainByPos(oneKey,x,y)){
            name = oneKey;
            break;
        }

    }

    return name;
}

module.exports = {
    setOffsetPos,
    getPosNameByPos,
    isSetOffsetPos,
    getOffsetPoxByXY,
    setOffsetPosTwo,
    getPosNameByPosTwo,
    isSetOffsetPosTwo,
    getAllCanvasKey
};